﻿using System;
using System.Collections.Generic;
using System.Linq;
using UcAsp.Net.Interface;
namespace UcAsp.Net.BLL
{
    public class CategoriesSelect : ISelect
    {
        public List<object> Execute(object id)
        {
            List<Model.Categories> list = new BLL.CategoriesBLL().SelectList(Convert.ToInt32(id));
            List<Model.Select> query = new List<Model.Select>();
            foreach (Model.Categories c in list)
            {
                Model.Select s = new Model.Select();
                s.Name = c.CategorieName;
                s.Value = c.ID.ToString();
                query.Add(s);
            }
            return query.ToList<object>();
        }
    }
}